import Vue from 'vue'
import Vuex from 'vuex'
import createPersist from 'vuex-localstorage'
import user from './user'
import order from './orders'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user: user,
    order: order
  },
  plugins: [
    createPersist({
      namespace: 'liberty',
      initialState: {},
      expires: 7 * 24 * 60 * 60 * 1e3
    })
  ]
})
